From: Georges Basile Stavracas Neto Date: Wed, 3 Jul 2019 16:27:21 +0000 (-0300) Subject: baseIcon: Align labels to the center X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~118 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c0e90807e0e80b7607be4eba7ad528f77ab37436;p=gnome-shell.git baseIcon: Align labels to the center Ensure icon labels are aligned to the center, both vertically and horizontally. This will be required for using BaseIcons as drag actors. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643 --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index d5f600513..c74ff4361 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -57,6 +57,10 @@ class BaseIcon extends St.Bin { if (params.showLabel) { this.label = new St.Label({ text: label }); + this.label.clutter_text.set({ + x_align: Clutter.ActorAlign.CENTER, + y_align: Clutter.ActorAlign.CENTER + }); this._box.add_actor(this.label); } else { this.label = null;